<!--#include file="AspCms_plugFun.asp" -->
<%
Sub NoCache
On Error Resume next
Response.CacheControl = "no-cache"
End Sub
NoCache
%>
<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>Plug</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />

<link href="https://cdn.bootcss.com/uikit/3.0.0-beta.22/css/uikit.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/css/perfect-scrollbar.min.css" rel="stylesheet">
<link href="../css/timoo/fancySelect.css" rel="stylesheet">
<link href="../css/timoo/timoo.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit-icons.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/js/perfect-scrollbar.jquery.min.js"></script>
<script src="../js/timoo/icheck.min.js"></script>
<script src="../js/timoo/fancySelect.js"></script>
<script src="../js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section setting-company">
            <div class="layout">
                <div class="title">插件列表</div>
                <div class="content">
                    <form  method="post" name="form">
                        <div class="uk-text-center table">
                            <table class="uk-table uk-table-divider">
                                <thead>
                                    <tr>
                                        <th>名称</th>
                                        <th>版本</th>
                                        <th>版权</th>
                                        <th>目录</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <%
                                        Dim folderArry,folderAttr,i,tempStr,whereStr,plugArray,MenuLinks,MenuLink
                                        folderArry=getFolderList("../../plug")
                                        
                                        if instr(folderArry(0),",")>0 then 
                                          
                                            for i=0 to ubound(folderArry)
                                              
                                                folderAttr=split(folderArry(i),",")
                                                Dim xmlObj : Set xmlObj=new XmlClass
                                               
                                                if isExistFile(folderAttr(4)&"/plug.xml") then
                                                  
                                                    xmlObj.load folderAttr(4)&"/plug.xml","xmlfile"
                                                    'die xmlObj.getNodeValue("plugkey",0)
                                                    whereStr="where MenuKey='"& xmlObj.getNodeValue("plugkey",0)&"'"
                                                    plugArray=conn.Exec("select * from {prefix}Menu "&whereStr&"","arr")
                                                   
                                                    if isarray(plugArray) then
                                                      
                                                        MenuLinks=split(xmlObj.getNodeValue("pagepath",0),"|")
                                                       
                                                        if isarray(MenuLinks) then
                                                            MenuLink=MenuLinks(0)
                                                        end if
                                                        
                                                        tempStr="<ul class='uk-clearfix'><li class='uk-float-left'><input type='button' value='正在使用' class='useing' disabled></li><li class='uk-float-left'><input type='submit' value='卸载' onclick=""form.action='?action=del&plugpath="&folderAttr(0)&"&plugkey="&xmlObj.getNodeValue("plugkey",0)&"'""></li><li class='uk-float-left'><input type='button' value='设置' onClick=""window.location.href='"&sitePath&"/plug" & "/"& folderAttr(0)&"/"&MenuLink&"'""></li>"
						                            else
						                                tempStr="<input type='submit' value='安装此模块' onclick=""form.action='?action=add&plugkey="&xmlObj.getNodeValue("plugkey",0)&"&Menuname="&xmlObj.getNodeValue("pagename",0)&"&MenuLink="&xmlObj.getNodeValue("pagepath",0)&"&plugpath="&folderAttr(0)&"'"">"
                                                    end if
                                        
                                                    echo "<tr>"&vbcrlf& _
                                                         "<td>"&xmlObj.getNodeValue("ScreenShot",0)&"</td>"&vbcrlf& _
                                                         "<td>"&xmlObj.getNodeValue("description",0)&"</td>"&vbcrlf& _
                                                         "<td>"&xmlObj.getNodeValue("powerdby",0)&"</td>"&vbcrlf& _
                                                         "<td>"&folderAttr(0)&"</td>"&vbcrlf& _
                                                         "<td class='uk-flex uk-flex-center uk-text-center control'>"&tempStr&" </td>"&vbcrlf& _
                                                         "</tr>"&vbcrlf
                                                end if
                                                
                                            next
                                        
                                        end if
                                        
                                    %>
                                </tbody>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>